(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/Script/ScrollComponent.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, '44a18QxPphCrYoNXEEDVjKw', 'ScrollComponent', __filename);
// Script/ScrollComponent.ts

Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var ListItem_1 = require("./ListItem");
var ScrollComponent = (function (_super) {
    __extends(ScrollComponent, _super);
    function ScrollComponent() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ScrollComponent.prototype.onLoad = function () {
        var _loop_1 = function (i) {
            var news = cc.instantiate(this_1.slotPrefab);
            var listItem = news.getComponent(ListItem_1.ListItem);
            listItem.textx.string = "zzzzz";
            self = this_1;
            url = "head/3";
            cc.loader.loadRes(url, cc.SpriteFrame, function (err, spriteFrame) {
                listItem.spritex.spriteFrame = spriteFrame;
            });
            this_1.scrollView.content.addChild(news);
        };
        var this_1 = this, self, url;
        for (var i = 0; i < 13; i++) {
            _loop_1(i);
        }
    };
    ScrollComponent.prototype.closeCurrent = function () {
        this.node.active = false;
    };
    __decorate([
        property(cc.Prefab)
    ], ScrollComponent.prototype, "slotPrefab", void 0);
    __decorate([
        property(cc.ScrollView)
    ], ScrollComponent.prototype, "scrollView", void 0);
    ScrollComponent = __decorate([
        ccclass
    ], ScrollComponent);
    return ScrollComponent;
}(cc.Component));
exports.default = ScrollComponent;

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=ScrollComponent.js.map
        